package com.shun.common.exception;

import com.shun.common.R;

/**
 * 业务异常信息
 * @author clever
 * @since 2021-09-27
 */
public class ShunBizException extends RuntimeException{

    private String code;

    private String message;

    private R result;

    public ShunBizException(String message){
        super(message);
    }

    public ShunBizException(String code,String message){
        super(message);
        this.code = code;
        this.message = message;
    }

    public ShunBizException(R result){
        super(result.getMsg());
        this.result = result;
    }

    public R toR(){
        return this.result;
    }
}
